export const jobSpread={
    tries:5,
    directions:[TOP_LEFT, TOP, TOP_RIGHT, RIGHT, LEFT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT],
    /**
     * 
     * @param {Creep} creep 
     * @param {Number} centerX 
     * @param {Number} centerY 
     * @param {Number} distance 
     * @returns {CreepActionReturnCode}
     */
    run:function(creep,centerX=24,centerY=24, distance=23){
        if(creep.memory.goto){
            creep.memory.goto.target = undefined;
        }
        if(!creep.pos.inRangeTo(centerX,centerY,distance)){
            creep.moveTo(centerX,centerY);
        }
        let randomDirection=Math.floor(Math.random()*8)+1;
        return creep.move(randomDirection);
    }
};